{template '_header'}
<link rel="stylesheet" type="text/css" href="../addons/ewei_shopv2/plugin/qa/static/css/common.css?v=2016063000">
<div class='fui-page  fui-page-current'>
    <div class="fui-header">
        <div class="fui-header-left">
            <a class="back" onclick='location.back()'></a>
        </div>
        <div class="title">{php echo m('plugin')->getName('qa')}</div>
        <div class="fui-header-right">
            <a class="icon icon-home external" href="{php echo mobileUrl()}"></a>
        </div>
    </div>
    <div class='fui-content'>

        {if !empty($advs)}
        <div class='fui-swipe' data-transition="500" data-gap="1">
            <div class='fui-swipe-wrapper'>
                {loop $advs $adv}
                <a class='fui-swipe-item external' href="{if !empty($adv['link'])}{$adv['link']}{else}javascript:;{/if}"><img src="{php echo tomedia($adv['thumb'])}" /></a>
                {/loop}
            </div>
            <div class='fui-swipe-page'></div>
        </div>
        {/if}

        <form action="{php echo mobileUrl('qa/question')}" method="post">
            <div class="fui-searchbar bar">
                <div class="searchbar center">
                    <input type="submit" class="searchbar-cancel searchbtn" value="搜索" />
                    <div class="search-input">
                        <i class="icon icon-search"></i>
                        <input type="search" placeholder="输入关键字..." class="search" name="keyword">
                    </div>
                </div>
            </div>
        </form>

        {if count($category)>0}
            <div class="fui-cell-group qa-title">
                <div class="fui-cell">
                    <div class="fui-cell-text">推荐分类</div>
                    <a class="fui-cell-remark external" href="{php echo mobileUrl('qa/category')}">全部</a>
                </div>
            </div>
            <div class="fui-icon-group col-4 noborder">
                {loop $category $item}
                    <a class="fui-icon-col external" href="{php echo mobileUrl('qa/question', array('cate'=>$item['id']))}">
                        <div class="icon">
                            <img src="{php echo tomedia($item['thumb'])}"/>
                        </div>
                        <div class="text">{$item['name']}</div>
                    </a>
                {/loop}
            </div>
        {/if}

        <div class="fui-cell-group qa-title question-title" style="display: none">
            <div class="fui-cell">
                <div class="fui-cell-text">常见问题</div>
                <a class="fui-cell-remark external" href="{php echo mobileUrl('qa/question')}">全部</a>
            </div>
        </div>
        <div class="fui-list-group" id="container"></div>
    </div>
        <script type="text/html" id="tpl_list">
                <%each list as item%>
                <a class="fui-list" href="{php echo mobileUrl('qa/detail')}&id=<%item.id%>">
                    <div class="fui-list-inner">
                        <div class="title"><%item.title%></div>
                    </div>
                    <div class="fui-list-angle">
                        <div class="angle"></div>
                    </div>
                </a>
                <%/each%>
        </script>
    <script language="javascript">
        require(['../addons/ewei_shopv2/plugin/qa/static/js/common.js'],function(modal){
            modal.init({cate: '', keyword: ''});
        });
    </script>
</div><!--版 权 所 有 : 微 橙 微 信 商 城 系 统 -->
{template '_footer'}